<%--
  Created by IntelliJ IDEA.
  User: WT-SUN
  Date: 2017/5/13
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="accessory" uri="http://accessoryPackageTag.weitu.net" %>
<!doctype html>
<html>
<head>
    <title>证书登记</title>
    <%@include file="/common/header.jspf" %>
    <script type="text/javascript">
        var danweiName="";
        <c:if test="${fn:length(ce.userDepartmentList) >0}">
        <c:forEach var="lis" items="${ce.userDepartmentList}">
        danweiName += ',' + '${lis.deptName}';
        </c:forEach>
        danweiName=danweiName.substring(1);
        </c:if>
        var certificateId='${ce.id}';
        var certificateCode='${ce.num}';
    </script>
    <script type="text/javascript" src="${ctx}/resources/js/train/certificate/edit.js"></script>
</head>
<body>
<div class="menu-right" style="width:80px;">
    <a id="btn_save" href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg">保存</a>
</div>
<form id="formCeData" method="POST">
    <input type="hidden" name="id" value="${ce.id}"/>
    <div class="information">
        <div class="information-title">
            <p>证书发证/复审/换证信息登记</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <div class="cuttle">
            <div style="clear: both">
                <div class="form_one" >
                    <label class="lable-style">姓名:</label>
                    <input id="userIdName"  class="easyui-textbox" value="${ce.realName}" editable="false" required="true" validType="validSelect" style="width: 240px;">
                    <input type="hidden" id="userId" name="userId" value="${ce.userId}"/>
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">工号:</label>
                    <input class="easyui-textbox" type="text" id="gonghao" value="${ce.userCode}" data-options="readonly:true" style="width: 240px;">
                </div>
                <div class="form_one">
                    <label class="lable-style">单位名称:</label>
                    <input id="danwei" type="text" class="easyui-textbox"  data-options="readonly:true"  style="width: 240px;">
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one" style="width: 720px">
                    <label class="lable-style">证书名称:</label>
                    <input name="name" type="text" class="easyui-textbox" value="${ce.name}" data-options="required:true"  style="width: 600px;">
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">岗位:</label>
                    <input id="gangwei" type="text" class="easyui-textbox"  value="${ce.postName}" data-options="readonly:true"  style="width: 240px;">
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one" style="width: 720px">
                    <label class="lable-style">证书编号:</label>
                    <input name="num" id="num" type="text" class="easyui-textbox" value="${ce.num}" data-options="required:true"  style="width: 600px;">
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">发证机关:</label>
                    <input class="easyui-textbox" type="text" name="issueAuthority" value="${ce.issueAuthority}"  data-options="required:true"  style="width:240px;">
                    <span>*</span>
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">发证机关级别:</label>
                    <input type="text" style="width: 240px" name="authorityLevelId" value="${ce.authorityLevelId}" id="authorityLevelId" data-options="required:true">
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">证书种类:</label>
                    <input type="text" style="width: 240px" name="certificateTypeId" value="${ce.certificateTypeId}" id="certificateTypeId" data-options="required:true">
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">发证/复审/换证日期:</label>
                    <input class="easyui-datebox" style="width: 240px;" value="${ce.certificateTime}" data-options="required:true,editable:false" id="certificateTime"  name="certificateTime">
                    <span>*</span>
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">是否复审:</label>
                    <input type="text" style="width: 240px" name="isReview" value="${ce.isReview}" id="isReview" data-options="required:true">
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">复审周期:</label>
                    <input type="text" style="width: 240px" name="reviewCycle" value="${ce.reviewCycle}" id="reviewCycle">
                </div>
                <div class="form_one">
                    <label class="lable-style">下次复审日期:</label>
                    <input class="easyui-datebox" style="width: 240px;" data-options="editable:false" value="${ce.nextReviewTime}" id="nextReviewTime"  name="nextReviewTime">
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one">
                    <label class="lable-style">是否复审:</label>
                    <input type="text" style="width: 240px" name="isChanged" value="${ce.isChanged}" id="isChanged" data-options="required:true">
                    <span>*</span>
                </div>
                <div class="form_one">
                    <label class="lable-style">换证周期:</label>
                    <input type="text" style="width: 240px" name="changedCycle" value="${ce.changedCycle}" id="changedCycle">
                </div>
                <div class="form_one">
                    <label class="lable-style">下次换证日期:</label>
                    <input class="easyui-datebox" style="width: 240px;" data-options="editable:false" value="${ce.nextChangedTime}"  id="nextChangedTime" name="nextChangedTime">
                </div>
            </div>
            <div style="clear: both">
                <div class="form_one" style="width: 720px;height: 55px">
                    <label class="lable-style">备注:</label>
                    <input name="remark" type="text" class="easyui-textbox" value="${ce.remark}"  data-options="multiline:true"
                           style="width: 600px;height: 50px"/>
                </div>
            </div>
        </div>
    </div>
    <div class="information">
        <div class="information-title">
            <p>附件信息</p>
            <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
        </div>
        <accessory:accessorySimple permission="write" packageKey="certificatepage" uploadUserId="${loginUser.id}" packageInfos="${accessoryList}"
                                   accessoryType="txt,docx,doc,xls,xlsx,jpg,png"></accessory:accessorySimple>
    </div>
</form>
<div class="information" id="occforbidTbDiv">
    <div class="information-title">
        <p>发证/复审/换证记录</p>
        <a href="#"><img src="${ctx}/resources/themes/images/alias_03.png" width="18"></a>
    </div>
    <div class="enclosure">
        <a id="cerTb_add" href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-plus fa-lg" style="margin:5px;">新增</a>
        <a id="cerTb_remove" href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-trash fa-lg" style="margin:5px;">移除</a>
        <a id="cerTb_save" href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg"  style="margin:5px;">保存</a>
        <table id="cerTb"></table>
    </div>
</div>
</body>
</html>
